package com.example.springboot.dao;

import com.example.springboot.entity.Admin;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.jpa.repository.JpaRepository;

public interface AdminRepository extends JpaRepository<Admin, Long> {

    @Select("SELECT * FROM sys_user WHERE username = #{username} AND password = #{password}")
    Admin findByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
}
